<div class="zs-ibox">
	<table class="zs-data-tab" width="100%">
		<tbody>
			<tr>
				<td class="text" width="10%">统计周期1</td>
				<td colspan="3"> <label 
					style="margin-left: 6px;"><input name="dataSource"
						value="2" parmText="分钟" class="zs-btn radio_btn" type="radio"
						style="padding-right: 2px" ng-change="searchHistoricalData()"
						ng-model="dataSource" />分钟</label>
					<label style="margin-left: 6px;"><input name="dataSource"
						value="3" parmText="小时" class="zs-btn radio_btn" type="radio"
						style="padding-right: 2px" ng-change="searchHistoricalData()"
						ng-model="dataSource" />小时</label>
					<label style="margin-left: 6px;" ng-show="waterType == '1'"><input name="dataSource" 
						value="6" parmText="" class="zs-btn radio_btn" type="radio"
						style="padding-right: 2px" ng-change="searchHistoricalData()"
						ng-model="dataSource" />周期数据</label>
					<label style="margin-left: 6px;"><input name="dataSource"
						value="4" parmText="天" class="zs-btn radio_btn" type="radio"
						style="padding-right: 2px" ng-change="searchHistoricalData()"
						ng-model="dataSource" />日均值</label>
					<label style="margin-left: 6px;" ng-show="waterType == '7'"><input name="dataSource" 
						value="8" parmText="小时(4小时)" class="zs-btn radio_btn" type="radio"
						style="padding-right: 2px" ng-change="searchHistoricalData()"
						ng-model="dataSource" />小时(4小时)</label>	
					<label style="margin-left: 6px;" ng-show="waterType == '7'"><input name="dataSource"
						value="7" parmText="天" class="zs-btn radio_btn" type="radio"
						style="padding-right: 2px" ng-change="searchHistoricalData()"
						ng-model="dataSource" />日均值(4小时)</label>
					
				</td>
			</tr>
			<tr ng-show="dataSource=='3' || dataSource == '4' || dataSource == '5' || dataSource == '6'|| dataSource == '7'|| dataSource == '8'">
				<td class="text" width="10%">起始日期:</td>
				<td class="input"><ag-Datebox class="zs-input" ng-change="checkErr();"
						ng-model="startDate" name="start" ></ag-Datebox>
				</td>
				<td class="text" width="10%">结束日期:</td>
				<td class="input"><ag-Datebox class="zs-input" ng-change="checkErr();"
						ng-model="endDate" name="end" ></ag-Datebox>
				</td>
				<td><input type="button" name="OK" 
					ng-click="searchHistoricalData()" value="查询" class="zs-btn">
					<input type="button" name="OK" ng-click="exportHistoricalExcel()" value="导出报表" class="zs-btn"></td>
			</tr>
			<tr ng-show="dataSource=='1' || dataSource == '2'">
				<td class="text" width="10%">日期:</td>
				<td class="input" style="width:220px"><ag-Datebox class="zs-input"
						ng-model="queryDate" name="start" ></ag-Datebox>
				</td>
				<td class="text" width="50px">小时:</td>
				<td class="input" style="width:220px">
					<select style="width:50px" class="zs-input" ng-model="startHour" ng-options="hour.id as hour.id for hour in hours">
					</select>
						~
					<select style="width:50px" class="zs-input" ng-model="endHour" ng-options="hour.id as hour.id for hour in hours">
					</select>
				</td>
				<td><input type="button" name="OK" ng-click="searchHistoricalData()" value="查询" class="zs-btn">
					<input type="button" name="OK" ng-click="exportHistoricalExcel()" value="导出报表" class="zs-btn">
				</td>
			</tr>		
		</tbody>
	</table>
	<div  class="zs-itabs" id="listdata">
		<ul class="idTabs">
			<li><a href='#lb' class="selected">列表</a></li>
			<li><a id = "tbChart" href='#tb' >图表</a></li>
		</ul>
    </div>
	<div id="lb" class="table" ng-style="{height:Map_H-180}">
			<div >
				<table class="zs-data-tab" freeze-grid 
							freeze-box-width='Map_W-50' 
							freeze-box-height='Map_H-180' 
							freeze-timecell-width='120'
							freeze-datacell-width='120'
							freeze-cell-height='30'
							head-rowlength='2'
							component-object="freezeGrid">
						<tr>
							<td  class="center time_column">数据时间</td>
							<td  class="center data_column" style="font-weight: bold;" ng-repeat="parm in parmToCheckList" ng-bind="parm.parmName_text"></td>
						</tr>
						<tr>
							<td  class="center time_column">范围</td>
							<td  class="center data_column" style="font-weight: bold;" ng-repeat="parm in limitList track by $index" ng-bind="parm"></td>								
						</tr>
						<tr ng-repeat="curRow in data.data" class="{{ isDoubleNum($index) ? 'even':'' }}">
							<td class="time_column"><label ng-bind="curRow['DATATIME']"></label></td>
							<td class="center data_column" ng-repeat="parm in parmToCheckList" style="width: 120px;min-width:120px">
								<label  ng-bind="curRow[parm.attrName]" ></label>
								<label class="datared tip" ng-if="curRow['P'+parm.parmName+'_ALARM_FLAG'] == 'ALARM_LESS'" title="{{curRow[parm.attrName]}}">
									<span class="station_yc2" title="异常"></span>
								</label>
								<label class="datared tip" ng-if="curRow['P'+parm.parmName+'_ALARM_FLAG'] == 'ALARM_OVER'">
									<span class="station_cb1" title="超标"></span>
								</label>
								<label class="datared tip" ng-if="curRow['P'+parm.parmName+'_ALARM_FLAG'] == 'ODD_OVER'">
									<span class="station_yc2" title="异常"></span>
								</label>
								<label class="datared tip" ng-if="curRow['P'+parm.parmName+'_ALARM_FLAG'] == 'ODD_LESS'">
									<span class="station_yc2" title="异常"></span>
								</label>
								<label title="{{dataFlagMap[curRow['P'+parm.parmName+'FLAG']]}}" ng-if="curRow['P'+parm.parmName+'FLAG'] != 'N' && curRow['P'+parm.parmName+'FLAG'] != '1'">
									{{curRow['P'+parm.parmName+'FLAG']}}
								</label>
			                </td>
						</tr>
				</table>
			</div>
	</div>
	
	<div id="tb" style="overflow-y:auto;display:none;" ng-style="{'height':(Map_H-100)+'px'}">
		<div style="display: inline-block;">
			<label ng-repeat="row in parmToCharList" style="margin-left: 6px;  display: block;float:left" class="parmLabel"><input ng-checked="row.checked" ng-click="checkedParm($event,$index)" class="zs-btn radio_btn" type="checkbox" />{{row.parmName}}</label>
		</div>
		<div id="char_tb" style="height:{{Map_H-50}}px;">
			
		</div>
    </div>
</div>